package com.mzz.Switch;

public class Fan extends dianqi{
    public Fan(boolean Brand,String name){
        super(Brand,name);
    }
    @Override
    public void open()
    {
        if(Brand==false){
            Brand=true;
        }
        System.out.println("打开"+name+"状态："+Brand);
    }
    @Override
    public void close()
    {
        if(Brand==true){
            Brand=false;
        }
        System.out.println("关闭"+name+"状态："+Brand);
    }
}
